<?php 
/* include Base class for interacting with RSS */
App::uses('RssComponent', 'Controller/Component');
App::uses('ArticlesFactory', 'Model');
App::uses('ComponentCollection', 'Component');

class CrawlManager extends AppModel{

	public function fetch($urls){
		$rsc = new RssComponent(new ComponentCollection());
		$rss = null;
		foreach($urls as $url){
			$rss = $rsc->parse($url);
		}
		$af = new ArticlesFactory();
		$articles = $af->create($rss);
		return $articles;
	}

	/* save the news to DataBase
	 *
	 */
	public function save(){

	}

	private function isValidUrl($url){

	}


}
?>
